package com.leyou.item.mapper;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.item.pojo.Category;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    @Select("SELECT * FROM tb_category c WHERE id IN (SELECT cb.category_id FROM \n" +
            "tb_category_brand cb\n" +
            "WHERE cb.brand_id = #{bid})")
    List<Category> queryByBrandId(Long bid);

}

